package cn.com.lms.business.core.constant;

/*
 * @author liuwei
 * @date 2020/3/16 18:26
 * @desc 常量值
 */
public class BNZConstants {

    /**
     * 课程类型编码
     */
    public static final String COURSE_TYPE_CODE = "COURSE_TYPE";
    /**
     * 学习计划类型Code
     */
    public static final String LEARNING_STATE_CODE = "STUDY_STATE";

    /**
     * 员工备案模板Code
     */
    public static final String EXCEL_URL = "EXCEL_URL";

    /**
     * 报表导出只读模式密码
     */
    public static final String EXCEL_PASSWORD = "EXCEL_PASSWORD";

    /**
     * 学习计划完成状态：已完成
     */
    public static final String FINISH_STATE = "1";
    /**
     * 未完成
     */
    public static final String UNFINISH_STATE = "0";

    /**
     * 延期完成
     */
    public static final String DELAY_COMPLETION = "2";

    /**
     * 类型：0 学习计划 1 阶段 2阶段详情
     */
    public static final Integer TYPE_ONE = 0;
    public static final Integer TYPE_TWO = 1;
    public static final Integer TYPE_THREE = 2;

    public static final String DB_NO_DELETE = "0";
    public static final String DB_NO_OVER = "0";

    /**
     * 上传文件类型后缀
     */
    public static final String JPG = ".jpg";
    public static final String PNG = ".png";
    public static final String DOC = ".doc";
    public static final String DOCX = ".docx";
    public static final String PPT = ".ppt";
    public static final String PPTX = ".pptx";
    public static final String XLSX = ".xlsx";
    public static final String XLS = ".xls";
    public static final String PDF = ".pdf";
    public static final String AVI = ".avi";
    public static final String MP4 = ".mp4";

    public static String FIVE = "5";
    /**
     * 快捷设置分数的记录编号
     */
    public static String CODE_NUMBER = "607542805b9f42728cf3259110860d82";


    public static String setFiveZero(String empNo) {
        boolean result = empNo.matches("[0-9]+");
        if (result) {
            empNo = setNumberZero(FIVE, Long.parseLong(empNo));
        }

        return empNo;
    }

    public static String setNumberZero(String data, Long data1) {
        String str = String.format("%0" + data + "d", data1);
        return str;
    }

}
